package com.wy.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wy.model.entity.Permission;
import com.wy.model.vo.AssignMenuVo;
import com.wy.model.vo.RouterVo;

import java.util.List;

public interface PermissionService extends IService<Permission> {
  //菜单列表（树形）
  List<Permission> findNodes();

  //删除权限
  void removePermissionById(Integer id);

  //根据角色分配菜单
  List<Permission> findMenuByRoleId(Integer roleId);

  //给角色分配菜单权限
  void doAssign(AssignMenuVo assignMenuVo);

  //根据userid查询菜单权限值
  List<RouterVo> getUserMenuList(Integer id);

  //根据userid查询按钮权限值
  List<String> getUserButtonList(Integer id);
}
